package com.baidu.service.impl;

import com.baidu.model.entity.ActivityModel;
import com.baidu.model.entity.example.ActivityModelExample;
import com.baidu.model.mapper.ActivityModelMapper;
import com.baidu.service.InActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ActivityServiceImpl implements InActivityService {

    @Autowired
    private ActivityModelMapper activityModelMapper;

    @Override
    public List<ActivityModel> selectByUserId(Integer id) {
        ActivityModelExample activityModelExample = new ActivityModelExample();
        activityModelExample.createCriteria().andUserIdEqualTo(id);
        return activityModelMapper.selectByExample(activityModelExample);
    }
}
